﻿<%@ Page Title="" Language="C#" MasterPageFile="~/phone/OAMobi.Master" AutoEventWireup="true" CodeBehind="ChgPwd.aspx.cs" Inherits="ZX.WebApp.Phone.ChgPwd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
    <script type="text/javascript" src="/phone/js/login.js"></script>
    <script>

        //修改密码
        function ConfirmPassword() {
            if (document.getElementById("NewPassword").value == "") {
                alert("密码不能为空！");
                return;
            }
            if (document.getElementById("NewPassword").value != document.getElementById("NewPassword1").value) {
                alert("二次密码不一致！请重新设置。");
                return;
            }
            $.ajax({
                type: 'POST',
                url: 'Proc/GetData.ashx',
                headers: {},
                dataType: 'html',
                data: { TYPE: "ModifyPassword", PARA: document.getElementById("NewPassword").value },
                success: function (data) {
                    alert("密码修改成功");
                    window.location = "index.aspx";
                },
                error: function (err) {
                    alert(err);
                    alert("网络不可用或账号信息过时，请重新登录");
                    window.location = "../login.aspx";
                }
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
<div class="container">
    
          <div id="alertTest" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">提示标题</h3>
    </div>
    <div class="modal-body">
        <p>提示内容！</p>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    </div>
</div>
      <form class="form-signin" role="form" action="ChgPwd.aspx">



        <h4 class="form-signin-heading">修改密码</h4>
        <input type="text" class="form-control" id="OldPassword" placeholder="原密码" value="" required="required" />
          <br />
        <input type="password" class="form-control" id="NewPassword" placeholder="新密码" value="" required="required"/>
          <br />
        <input type="password" class="form-control" id="NewPassword1" placeholder="确认密码"  value="" required="required"/>
        <br />
        <input id="btnSave" type="button"  class="btn btn-lg btn-primary btn-block" onclick="ConfirmPassword();" runat="server"  value="确认修改" />
      </form>

    </div> <!-- /container -->
</asp:Content>
